<!DOCTYPE html>
<html>
<head>
    {% render_head "Control 3.7" %}
</head>
<body>
    {% render_menu "menu.html" %}
    <div class="container">
        <h2>Формирование перечня маршрутов выполнения функциональных объектов</h2>
        <div class="col-md-8">
        {% if enable3 %}
            <h2>{{label3}}</h2>
            {% if list_cfg %}
                <div clas="col-md-8">
                {% for cfg in list_cfg %}
                        <pre class="bg-success"><b>{{cfg.function_name}}</b></pre>
                        <object id="func{{forloop.counter}}" class="img-rounded bordered img-responsive" type="image/svg+xml" data="{{cfg.saved_image_file}}">Your browser does not support SVG</object>
                        {% if cfg.control_block_list %}
                            <pre class="white-bg">{% for c_block in cfg.control_block_list %}<b id="{{cfg.function_name}}{{c_block.name}}">[{{c_block.name}}{% if c_block.first %} (ENTRY){% endif %}{% if c_block.last %} (EXIT){% endif %}]</b><br>{% if c_block.lines %}{% for line in c_block.lines %}    {{line}}<br>{% endfor %}{% endif %}<b>Preds: </b>{% for pred in c_block.preds %}<a href="#{{cfg.function_name}}{{pred}}">{{pred}}</a>{% if not forloop.last %}, {% endif %}{% endfor %}<br><b>Succs: </b>{% for succ in c_block.succs %}<a href="#{{cfg.function_name}}{{succ}}">{{succ}}</a>{% if not forloop.last %}, {% endif %}{% endfor %}<br>{% if not forloop.last %}<br>{% endif %}{% endfor %}</pre>
                        {% endif %}
                {% endfor %}
                </div>
            {% endif %}

        {% endif %}
    </div>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
    <!-- Make svg zoomable -->
    {% if enable3 and list_cfg %}
        <script src="http://ariutta.github.io/svg-pan-zoom/dist/svg-pan-zoom.min.js"></script>
        <!--<script>window.onload = function()
          {
            {% for cfg in list_cfg %}
            window.func{{forloop.counter}} = svgPanZoom('#func{{forloop.counter}}', {zoomEnabled: true,controlIconsEnabled: true});
            {% endfor %}
          };
        </script>-->
    {% endif %}

</body>
</html>